package me.idashu.attg.service;

import java.util.List;
import java.util.Map;

import me.idashu.attg.domain.AuditeEntity;
import me.idashu.attg.domain.RecommendEntity;
import me.idashu.attg.domain.RecommendsDataStatisticsEntity;
import me.idashu.attg.persistence.RecommendMapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RecommendService {
	@Autowired
	private RecommendMapper recommendMapper;
	
	public List<RecommendEntity> getRecommendsList(Map<String, Object> map){
		return recommendMapper.getRecommendsList(map);
	}
	
	public int recommendCount(){
		return recommendMapper.recommendCount();
	}
	
	public void deleteRecommends(int recommendId){
		recommendMapper.deleteRecommends(recommendId);
	}
	
	public void insertRecommend(RecommendEntity recommend){
		recommendMapper.insertRecommend(recommend);
	}
	
	public void updateRescoreById(long id){
		recommendMapper.updateRescoreById(id);
	}
	
	public List<RecommendEntity> findRecommends(Map<String, Object> map){
		List<RecommendEntity> recommends = recommendMapper.findRecommends(map);
		return recommends;
	}
	
	public int findCountRecommends(RecommendEntity recommendEntity){
		int count = recommendMapper.findCountRecommends(recommendEntity);
		return count;
	}
	
	public int auditeCount(int recommendId){
		return recommendMapper.auditeCount(recommendId);
	}
	
	public List<AuditeEntity> auditeList(Map<String, Object> map){
		return recommendMapper.auditeList(map);
	}
	
	public List<RecommendsDataStatisticsEntity> getRecommendsDataStatisticsList(Map<String, Object> map){
		return recommendMapper.getRecommendsDataStatisticsList(map);
	}
	
}
